package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 按键报警（人员报警）对象 key_alert
 *
 * @author ruoyi
 * @date 2025-09-17
 */
public class KeyAlert extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 对应key_personnel_admin表的position_user_id
     */
    @Excel(name = "对应key_personnel_admin表的position_user_id")
    private Integer entityId;

    /**
     * 用户名
     */
    @Excel(name = "用户名")
    private String userName;

    /**
     * 标签id
     */
    @Excel(name = "标签id")
    private String tagId;

    /**
     * 报警规则ID
     */
    @Excel(name = "报警规则ID")
    private Integer triggerId;

    /**
     * 报警名称
     */
    @Excel(name = "报警名称")
    private String triggerName;

    /**
     * 触发时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date raiseTime;

    /**
     * 关闭时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "关闭时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date stopTime;

    /**
     * 报警状态：0触发 1关闭
     */
    @Excel(name = "报警状态：0触发 1关闭")
    private Integer state;

    /**
     * 地图编号
     */
    @Excel(name = "地图编号")
    private Long areaId;

    /**
     * 经度
     */
    @Excel(name = "经度")
    private String lon;

    /**
     * 维度
     */
    @Excel(name = "维度")
    private String lat;

    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String x;

    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String y;

    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String z;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String createdBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     * 逻辑删除标识 0删除 1正常
     */
    private Integer delFlag;

    /**
     * 市局上报唯一ID
     */
    @Excel(name = "市局上报唯一ID")
    private String governId;

    /**
     * 上报状态 0待上报 1已上报
     */
    @Excel(name = "上报状态 0待上报 1已上报")
    private Integer isUpload;

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setEntityId(Integer entityId) {
        this.entityId = entityId;
    }

    public Integer getEntityId() {
        return entityId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setTagId(String tagId) {
        this.tagId = tagId;
    }

    public String getTagId() {
        return tagId;
    }

    public Integer getTriggerId() {
        return triggerId;
    }

    public void setTriggerId(Integer triggerId) {
        this.triggerId = triggerId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public void setTriggerName(String triggerName) {
        this.triggerName = triggerName;
    }

    public String getTriggerName() {
        return triggerName;
    }

    public void setRaiseTime(Date raiseTime) {
        this.raiseTime = raiseTime;
    }

    public Date getRaiseTime() {
        return raiseTime;
    }

    public void setStopTime(Date stopTime) {
        this.stopTime = stopTime;
    }

    public Date getStopTime() {
        return stopTime;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setLon(String lon) {
        this.lon = lon;
    }

    public String getLon() {
        return lon;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLat() {
        return lat;
    }

    public void setX(String x) {
        this.x = x;
    }

    public String getX() {
        return x;
    }

    public void setY(String y) {
        this.y = y;
    }

    public String getY() {
        return y;
    }

    public void setZ(String z) {
        this.z = z;
    }

    public String getZ() {
        return z;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setGovernId(String governId) {
        this.governId = governId;
    }

    public String getGovernId() {
        return governId;
    }

    public void setIsUpload(Integer isUpload) {
        this.isUpload = isUpload;
    }

    public Integer getIsUpload() {
        return isUpload;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("entityId", getEntityId())
                .append("userName", getUserName())
                .append("tagId", getTagId())
                .append("triggerId", getTriggerId())
                .append("triggerName", getTriggerName())
                .append("raiseTime", getRaiseTime())
                .append("endTime", getStopTime())
                .append("state", getState())
                .append("areaId", getAreaId())
                .append("lon", getLon())
                .append("lat", getLat())
                .append("x", getX())
                .append("y", getY())
                .append("z", getZ())
                .append("createdBy", getCreatedBy())
                .append("createdTime", getCreatedTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .append("governId", getGovernId())
                .append("isUpload", getIsUpload())
                .toString();
    }
}

